1. Field of the Invention
The present invention relates to a method, an apparatus, and a program for detecting faces facing specific directions from within digital images.
2. Description of the Related Art
Conventionally, techniques for detecting faces included in digital images (hereinafter, simply referred to as “images”) are utilized in various fields, such as digital cameras and authenticating systems. However, there are cases in which a technique that detects only faces facing specific directions within images is desired.
As a method for detecting only faces facing specific directions, a method, in which partial images are cut out from a plurality of different positions within an image, and whether each of the partial images includes a face facing the specific directions is judged, may be considered. To perform the judgments, the use of classifiers, which are generated by a machine learning method employing sample images, are superior in classifying accuracy, and are robust, may be considered. Previously proposed techniques employing such classifiers are as follows.
S. Lao et al. disclose a method for discriminating the directions in which faces are facing within images, in “Fast Omni-Directional Face Detection”, Meeting on Image Recognition and Understanding (MIRU2004), July 2004. In this method, human faces are designated as predetermined subjects, and the directions that the faces are facing are designated as the states of the subject. Classifiers for judging whether judgment target images include faces facing in predetermined directions are prepared for each direction that the faces face, and the directions in which the faces are facing are discriminated thereby.
In addition, Japanese Unexamined Patent Publication Nos. 5(1993)-282457 and 2005-250772 disclose methods in which classifiers are generated by the same basic method as disclosed by Lao et al. However, in these methods, the sample images for learning include magnified/reduced images, rotated images, and images with different aspect ratios. Thereby, there is a degree of tolerance in the shapes of faces capable of being judged by the classifiers.
In order to generate classifiers for classifying faces facing specific directions, a method based on the machine learning technique employing sample images as disclosed by Lao et al. may be considered. That is, classifiers may be generated by machine learning employing sample images that include faces facing in angular ranges corresponding to the specific directions to be classified.
Here, in the case that the faces facing a specific direction are to be detected in a highly discriminate manner, it is necessary to narrow the aforementioned angular range of faces included in the sample images. However, judgment results by classifiers, which are generated employing sample images with narrow angular ranges of faces therein, are likely to be influenced by variations in the shapes of faces. These classifiers are not applicable to cases in which the shapes of faces differ. Therefore, there is a problem that detection using these types of classifiers does not detect all faces facing the specific direction within an image. That is, the detection rate becomes low when these types of classifiers are used.
On the other hand, in the case that faces facing a specific direction are to be detected with a high detection rate, classifiers which are applicable to faces having different shapes may be generated. These classifiers may be generated by employing magnified/reduced sample images, rotated sample images, and sample images having different aspect ratios, as proposed in Japanese Unexamined Patent Publication Nos. 5(1993)-282456 and 2005-250772. The angular ranges of faces, which are judgment targets of classifiers generated in this manner, tend to be wider, and there is a problem that detection in a discriminatory manner is not possible by using these classifiers.
That is, face classifiers generated by machine learning employing the aforementioned sample images have wide angular ranges in the direction that faces to be detected are facing, if the degree of tolerance with respect to the shapes of faces is increased. Conversely, if the degree of tolerance is decreased, the angular ranges become narrow. Therefore, it is difficult for a large degree of tolerance and a narrow angular range to be compatible in face classifiers. If faces facing specific directions are to be detected from within images by using face classifiers, it is difficult to achieve a high detection rate simultaneously with highly discriminatory detection with respect to the specific directions.
FIGS. 15A and 15B are conceptual diagrams that illustrate the relationship between the detection rate and the discriminatory nature of detection. In each of FIGS. 15A and 15B, a ranges of specific facing directions to be detected and a range of facing directions detectable by a classifier are indicated in a space that represents facing directions. FIG. 15A illustrates a case of a classifier which has been generated by learning employing sample images of faces having a comparatively narrow range of facing directions. In this case, detection of faces facing a specific direction can be performed in a highly discriminatory manner, as the range of detectable facing directions becomes narrower. However, the classifier is not capable of detecting faces having various shapes, and therefore the detection rate is low. On the other hand, FIG. 15B illustrates a case of a classifier which has been generated by learning employing sample images of faces having a comparatively wide range of facing directions, and variations in the shapes thereof. In this case, the classifier is capable of detecting faces having various shapes, and therefore the detection rate is high. However, the detectable range of the classifier becomes greater than the range of specific facing directions to be detected, and detection of faces facing a specific direction cannot be performed in a highly discriminatory manner.